<?php
session_start();

if(session_is_registered('username')){
require "index2.php";
}else{
?>
<script>
document.location.href="../login/"
</script>
<?php
}
?>